<?php
ob_start();
session_start();
if(!isset($_SESSION['user'])) die ('请你先登陆<a href=/index.php>login</a>');
include('../config.php');  
mysql_select_db(SAE_MYSQL_DB,$conn) or die("数据库".SAE_MYSQL_DB."连接失败!"); 
$use=$_SESSION['uid'];
$u=intval($_GET['u']);
$iod=intval($_GET['iod']); 
if($use!=$u) die('请不要提交非法参数');
$sqlstr="SELECT * FROM sp WHERE spuserid='$use' AND spid='$iod'";
$result=mysql_query($sqlstr,$conn);
if(!result) die('!非法');
$sqldel="DELETE FROM sp WHERE spuserid='$u' AND spid='$iod'";
$result2=mysql_query($sqldel,$conn);
if(!result2){
die('非法参数导致操作出现中断，请检查');
}else{
if($_GET['s']=='zhaiwu') header("Location:debtlist.php");
if($_GET['s']=='touzi') header("Location:investlist.php");
if($_GET['s']=='1') header("Location:ss.php?ac=ss");
if($_GET['s']=='2') header("Location:ss.php?ac=srlist");
}
ob_flush();
?>